<template>
	<view class="page" style="padding-top: 128px;">
		<view style="flex: 1;">
			<navview :title="title">
				<view @click="openPublish" style="flex-direction: row;align-items: center;justify-content: center;border-width: 1px;border-color: #e5e5e5;
				border-radius: 4px;border-style: solid;padding: 3px;
				">
					<text class="iconfont iconjiaguanzhuhuati" style="font-size: 20px;color: #2C405A;"></text>
					<text style="font-size: 13px;color: #2C405A;">发布需求</text>
				</view>
			</navview>

			<tabs :tabs="tbs" scroll="true" defaultColor="#aaaaaa" activeColor="#222222" sBlockColor="#222222" style="position: fixed;left: 0;top: 64px;right: 0;"></tabs>

			<view class="" style="flex: 1;display: block;padding-left: 12px;padding-right: 12px;padding-bottom: 12px;background-color: #f5f6fb;">
				<!-- item -->
				<view v-for="n in 13" :key="n" class="" style="margin-top: 12px;height: 110px;box-shadow: 0 1px 3px #00000040;border-radius: 10px;">
					<view class="" style="justify-content: center;padding: 12px;flex: 1;background-color: #FFFFFF;border-radius: 10px;">
						<text style="font-size: 28px;color: #333333;">主标题</text>
						<view class="" style="height: 12px;" />
						<text style="font-size: 14px;color: #999999;">子标题</text>
					</view>
				</view>
			</view>
		</view>

		<uni-popup ref="popup" type="bottom" @touchmove.stop.prevent="moveHandle">
			<template>
				<view style="height: 400px;background-color: #FFFFFF;padding: 12px;">
					<!-- 图片 -->
					<view style="height: 110px;background-color: #4CD964;">
						<image @click="chooseImv" :src="upimv" style="border-width: 1px;border-color: #e5e5e5;width: 72px;height: 72px;background-color: #F5F5F5;
							border-style: solid;
							"
						 mode=""></image>
					</view>
					<!-- line -->
					<view style="height: 1px;background-color: #e5e5e5;" />


				</view>
			</template>
		</uni-popup>

	</view>
</template>

<script>
	import uniPopup from '@/components/uni-popup/uni-popup.vue'
	import uniPopupMessage from '@/components/uni-popup/uni-popup-message.vue'
	import uniPopupDialog from '@/components/uni-popup/uni-popup-dialog.vue'

	import navview from "@/cmps/navview.vue"
	import tabs from "@/components/wyb-tabs/wyb-tabs.vue"
	export default {
		components: {
			navview,
			tabs,

			uniPopup,
			uniPopupMessage,
			uniPopupDialog
		},
		created() {
			console.log("333333333333");
			let self = this
			uni.$on("param", (obj) => {
				self.title = obj.title
			})
		},
		onShow(op) {

		},
		data() {
			return {
				title: '',
				tbs: [{
						label: "需求"
					},
					{
						label: "解决"
					},
				],
				upimv: '',
			}
		},
		onLoad() {

		},
		methods: {
			openPublish() {
				this.$refs.popup.open()
			},
			chooseImv() {
				let self = this
				uni.chooseImage({
					count: 1,
					success: (res) => {
						let arr = res.tempFilePaths;
						self.upimv = arr[0]
					}
				})
			},
		}
	}
</script>

<style>
	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>
